home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / vedt.zip / DEMO12.VDM < prev    next >
Text File  |  1990-07-13  |  4KB  |  113 lines

  1. RI(9)/VEDIT Family - Programming Features/
  2. M(H)            !Display header
  3.  
  4. YT/
  5. All VEDIT Family editors are heavily oriented towards programmers; most
  6. features are useful to the task of editing programs.  Several additional
  7. features are intended specifically for program editing.  These are described
  8. here.
  9.  
  10. /
  11.  
  12. M(K)
  13.  
  14. YWI YWB(1) 9
  15. Q26YEA            !Set editing attribute
  16. YWS(1) Q27YEA        !Set attribute in lower window "1"
  17. EZY            !Empty edit buffer
  18. EB demo12a.txt    !Load demo text
  19. 5L            !Goto line 6
  20. EP 2 1            !Enable auto-indent
  21. EO 8 1            !Enable Insert-mode
  22.  
  23. EE(1)
  24. B#K
  25. I/The key <ALT-F3> performs nested parentheses matching.  These parentheses
  26. can be any of the sets of characters: { and }, [ and ], < and >, ( and ).
  27. This function is especially useful for checking the syntax of "C" programs
  28. and VEDIT PLUS macros.
  29.  
  30. Press <ALT-F3>.  The cursor moves to the first parenthesis.  Press <ALT-F3>
  31. again.  The cursor now moves to the matching parenthesis.  Press it again.
  32. The cursor moves back to the original parenthesis.  Experiment.
  33.         --- Then press <ESC> to continue ---/
  34.  
  35. B -V
  36. EE(@)
  37. V
  38.  
  39. EE(1)
  40. B#K
  41. I/VEDIT can automatically indent the lines of a structured program.  Two modes
  42. are available.  In the simplest mode, each new line is indented to the "indent
  43. margin" set with the keys <F7> and <F8>.  In "Auto-Indent" mode, preferred for
  44. programming, the new line is initially indented the same as the line above it.
  45. You can change this initial indent by pressing <F7> or <F8>.
  46.  
  47. Press <Enter> while in "Insert" mode.  Notice how the new line is immediately
  48. indented.  Type a line of text.  Press <Enter> again.  Now press <F7> and <F8>
  49. to change the indent.  Experiment.    --- Then press <ESC> to continue ---/
  50.  
  51. B -V
  52. EE(@)
  53. B 22L -2C        !Move to end of an indented line
  54. V
  55.  
  56. EE(1)
  57. B#K
  58. I\An entire block of text can be re-indented by simply highlighting the block,
  59. positioning the cursor anywhere within the block and and pressing <F7> and/or
  60. <F8> as desired.  Try it:
  61.  
  62. Move the cursor anywhere on the first line to be re-indented. Press <F9> to 
  63. start highlighting.  Move the cursor anywhere on the last line of the block.  
  64. Press <F9> again.  Press <F8> and all lines in the block are indented an 
  65. additional 4 columns.  Experiment with <F7> and <F8>.  Press <CTRL-C> to 
  66. remove the highlighting.    --- Then press <ESC> to continue ---\
  67.  
  68. B -V
  69. EE(@)
  70. V
  71.  
  72. EZY            !Empty edit buffer
  73. EB demo12b.txt    !Read next demo file
  74. 6L            !Goto line 7
  75. EP 4 2            !Enable conditional LC to UC conversion
  76. ES 3 0            !Disable auto-indent
  77. 1YML            !Reset left margin
  78.  
  79. EE(1)
  80. B#K
  81. I/Many assembly language programmers prefer to have their labels, opcodes and
  82. operands in upper case letters and their comments in upper and lower case, as
  83. above.  To speed assembly language editing, VEDIT can automatically convert
  84. all letters left of the comment ";" to upper case.
  85.  
  86. Edit the assembly language code above.  Notice how letters typed in lower case
  87. are automatically converted to upper case when the cursor is to the left of
  88. the ";" comment character.   Try entering new lines of code.  Experiment.
  89.         --- Press <ESC> to continue ---/
  90.  
  91. B -V
  92. EE(@)
  93. V
  94.  
  95. EE(1)
  96. B#K
  97.  
  98. I/VEDIT has options for explicitly displaying Tab characters and the end of
  99. lines.  Both are normally displayed with (invisible) spaces, but can be
  100. changed.
  101.  
  102. Access the {CONFIG, Misc} sub-menu.  Change the "End-of-line character" to 17
  103. and the "Tab-fill character" to 250.  Press <CTRL-C> to exit the menu system.
  104. Notice how the screen display has changed.  VEDIT also has options for
  105. changing how other control and graphics characters are displayed.
  106.         --- Press <ESC> to return to the Main Menu ---/
  107.  
  108. B -V
  109. EE(@)
  110. V
  111. EP 8 32        !Restore end-of-line character
  112. EP 9 32        !Restore tab-fill character
  113.